package com.todo.ui.presenters
{
	import com.todo.model.constants.Navigation;
	
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	public class MainUIPresentationModel extends EventDispatcher
	{
		private var _stackIndex:String;
		
		[Bindable(Event="stackIndexChange")]
		public function get stackIndex():String
		{
			return _stackIndex;
		}
		
		public function set navigationPath( path:String ):void
		{
			if( path == Navigation.TODO_DETAIL ) _stackIndex = "detail";
			else if( path == Navigation.TODO_LIST ) _stackIndex = "list";
			else  _stackIndex = "login";
			
			dispatchEvent( new Event( "stackIndexChange" ) );
		}
		
	}
}
		
		